//
//  ViewController.m
//  UILabel
//
//  Created by clz on 2019/8/1.
//  Copyright © 2019年 clz. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //UILabel
    
    UILabel *label = [[UILabel alloc]init];
    label.text = @"我要自学网";
    label.font = [UIFont systemFontOfSize:20];
    label.textColor = [UIColor whiteColor];
    label.backgroundColor = [UIColor redColor];
    label.numberOfLines = 0;//0  不限制行数
    label.textAlignment = NSTextAlignmentCenter;//right  center
    
    [self.view addSubview:label];
    
    label.frame = CGRectMake(20, 20, 100, 100);
    
}


@end
